package com.woniuxy.store.client;

import com.woniuxy.store.client.param.ModStoreInfoParam;
import com.woniuxy.store.client.result.StoreInfoDto;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import result.Result;

/**
* name是项目名，contextId是client的名字
*/
@FeignClient(contextId = "storeInfoClient",name="store",path="/store/manage")
public interface StoreInfoClient {

    @GetMapping("/storeInfo")
    public Result<StoreInfoDto> getStoreInfo();

    @GetMapping("/getInfoById")
    public Result<StoreInfoDto>  getInfoById(@RequestParam("storeId") Integer storeId);

    @PutMapping("/storeInfo")
    public Result modifyStoreInfo(@RequestBody ModStoreInfoParam param);

    @PostMapping("/upLicense")
    public Result uploadLicense(@RequestParam("file") MultipartFile file) throws Exception;

    @PostMapping("/upPermit")
    public Result uploadPermit(@RequestParam("file") MultipartFile file) throws Exception;

}
